package com.luguangtao.service.impl;

import com.luguangtao.dao.InsuranceDao;
import com.luguangtao.entity.Insurance;
import com.luguangtao.service.InsuranceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @类名: com.luguangtao.service.impl
 * @作者: lgt
 * @创建时间: 2019-12-16 11:55
 * @描述:
 **/
//服务层实体类
public class InsuranceServiceImpl implements InsuranceService {
    @Autowired //注入接口
    InsuranceDao insuranceDao;
    //分页列表
    @Override
    public Page<Insurance> lists(@RequestParam(defaultValue = "1") Integer pageNum) {
        return insuranceDao.findAll(PageRequest.of(pageNum-1,3));
    }
}
